package org.as3search.criteria {
	/*
	 * as3search - http://code.google.com/p/as3search
	 * Copyright (c) 2009-2010 by respective authors. All rights reserved.
	 *
	 * This library is free software; you can redistribute it and/or modify it under the
	 * terms of the GNU Lesser General Public License as published by the Free Software
	 * Foundation; either version 2.1 of the License, or (at your option) any later
	 * version.
	 *
	 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
	 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
	 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
	 *
	 * You should have received a copy of the GNU Lesser General Public License along
	 * with this library; if not, write to the Free Software Foundation, Inc.,
	 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
	 */
	
	/**
	 * <code>Criterion</code> defines a single method, 
	 * <code>evaluate()</code> which determines if an object
	 * matches the given condition(s). Thus, <code>Criterion</code>
	 * is at the very top of the condition hierarchy in as3search, allowing
	 * implementations to mark an object as acceptable or not when 
	 * searching through a collection.
	 * 
	 * @see org.as3search.criteria.Restrictions
	 */
	public interface Criterion {
		/**
		 * Determines whether a given object matches the condition(s) set 
		 * forth by this <code>Criterion</code> instance. 
		 * @param	value	The object to test against this <code>Criterion</code> instance. 
		 * 		<code>value</code> may or may not be null, this is something to keep in 
		 * 		mind when building your own <code>Criterion</code> implementors.
		 * @return Returns true if <code>value</code> matches the conditions of this
		 * 		<code>Criterion</code> instance, false otherwise.
		 */
		function evaluate(value:Object):Boolean;
	}
}